import { escloudHttp } from '@/utils/http/axios';
// import { mockHttp } from '@/utils/http/axios';
import { GetDeliveryPlan, waitHandleCount, deliveryCount, transportType } from './model/biModel';

enum Api {
  GetDelivery = '/eslogis-bi/shipper/analysis/deliveryPlan',
  GetWaitHandleCount = '/eslogis-bi/shipper/analysis/waitHandleCount',
  GetDeliveryCount = '/eslogis-bi/shipper/analysis/deliveryCount',
  GetTransportType = '/eslogis-bi/shipper/analysis/transportType',
  GetReceiveCityTopType = '/eslogis-bi/shipper/analysis/receiveCityTop',
}

/**
 * @description: getDeliveryPlan
 */
export function getDeliveryPlan(data) {
  return escloudHttp.post<GetDeliveryPlan>(
    { url: Api.GetDelivery, data },
    { errorMessageMode: 'none' },
  );
}

/**
 * @description: getWaitHandleCount
 */
export function getWaitHandleCount(data) {
  return escloudHttp.post<waitHandleCount>(
    { url: Api.GetWaitHandleCount, data },
    { errorMessageMode: 'none' },
  );
}

/**
 * @description:
 */
export function getDeliveryCount(data) {
  return escloudHttp.post<deliveryCount>(
    { url: Api.GetDeliveryCount, data },
    { errorMessageMode: 'none' },
  );
}

/**
 * @description: 运输类型
 */
export function getTransportType(data) {
  return escloudHttp.post<transportType>(
    { url: Api.GetTransportType, data },
    { errorMessageMode: 'none' },
  );
}

/**
 * @description: 收货地区TOP10
 */
export function GetReceiveCityTopType(data) {
  return escloudHttp.post<transportType>(
    { url: Api.GetReceiveCityTopType, data },
    { errorMessageMode: 'none' },
  );
}
